<!DOCTYPE HTML>
<html>
	<head>
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
		<title>简历预览-我收到的简历-东莞大学生兼职网站-最专业的企业端招聘平台</title>
		<meta content="23635710066417756375" property="qc:admins">

		<!-- <div class="web_root"  style="display:none">h</div> -->
		</script>
		<script type="text/javascript">
			var ctx = "h";
			console.log(1);
		</script>
		<link href="h/images/favicon.ico" rel="Shortcut Icon">
		<link href="style/css/style.css" type="text/css" rel="stylesheet">
		<link href="style/css/colorbox.min.css" type="text/css" rel="stylesheet">
		<link href="style/css/popup.css" type="text/css" rel="stylesheet">

		<script type="text/javascript" src="style/js/jquery.1.10.1.min.js"></script>

		<script src="style/js/jquery.colorbox-min.js" type="text/javascript"></script>
		<script src="style/js/template-web.js" type="text/javascript"></script>
		<script src="style/js/getUrlParam.js" type="text/javascript"></script>
		<script src="style/js/neturl.js" type="text/javascript"></script>
		<script>
			$(function(){
	 $("body").on("click","a.btn_s",function(){
		$.colorbox.close();
		parent.jQuery.colorbox.close();
	});
	$(".inline").colorbox({
		inline:true
	});
});
</script>
		<script src="style/js/ajaxCross.json" charset="UTF-8"></script>
	</head>

	<body>
		<div id="previewWrapper">
			<div class="preview_header">
				<h1 id="name_cv">jason的简历</h1>
				<a id="cv_file" href="www.baidu.com" title="脚本之家" target="_blank">查看简历附件</a>
			</div>
			<!--end .preview_header-->

			<div class="preview_content">
				<div class="profile_box" id="basicInfo">
					<h2>基本信息</h2>
					<div class="basicShow">
						<span><span id="realname">Jason</span> |
							<span id="sex">男</span> | <span id="nature">汉族</span> <br><span id="married">男</span> | <span id="age">年龄</span>
							<br> <span id="city">东莞市</span><br>
							<span id="college">所读学校/毕业学校：</span><br>
							<span id="phone">联系方式：</span><br>
							<span id="email">邮箱地址：</span><br>

						</span>
						<div class="m_portrait">
							<div></div>
							<img width="120" height="120" alt="jason" src="style/images/default_headpic.png" id="photo">
						</div>
					</div>
					<!--end .basicShow-->
				</div>
				<!--end #basicInfo-->


				<div class="profile_box" id="workExperience">
					<h2>工作经历</h2>
					<div class="experienceShow">
						<ul class="wlist clearfix">
							<li class="clear">
								<span id="work_time" class="c9">2020.01-至今</span>
								<div>
									<h3 id="jobname" style="margin-left: 0px;"> </h3>
									<h4 id="work_content" style="margin-left: 0px;"></h4>
								</div>
							</li>
						</ul>
					</div>
					<!--end .experienceShow-->
				</div>
				<!--end #workExperience-->


				<div class="profile_box" id="educationalBackground">
					<h2>教育背景</h2>
					<div class="educationalShow">
						<ul class="elist clearfix">
							<li class="clear">
								<span class="c9" id="education_time">2019-2020</span>
								<div>
									<h3 id="college_name">北京大学</h3>
									<h4 id="major"></h4>
								</div>
							</li>
						</ul>
					</div>
					<!--end .educationalShow-->
				</div>
				<!--end #educationalBackground-->
			</div>
			<!--end .preview_content-->
		</div>
		<!--end #previewWrapper-->
		<!------------------------------------- end ----------------------------------------->
		<script>
			var company_id = "";
			var apply_id = '';
			var workPlaces = '';
			$(document).ready(function() {
					company_id = getCookie('company_id');
					if(company_id == ''){
						window.location.href = "login.html";
					}
					var uname = getCookie('uname');
					$('#uname').text(uname);
					apply_id = UrlParm.parm("apply_id");
					get_apply_info();
				});
				
				//存cookie
				function setCookie(name, value) {
					var Days = 30;
					var exp = new Date();
					exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
					document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
				}
				$("#logout").click(function() {
					console.log("退出")
					setCookie('company_id', '')
					setCookie('cname', '')
					setCookie('cemail', '')
					window.location.href = "login.html";
				});
				function get_apply_info(){
					$.ajax({ //传数据的方式
						url: ip_address + "/applyJob/companys/info?id=" + apply_id,
						type: "post",
						success: function(result, request) { //传数据成功之后的操作   result是servlet传过来的数据  这个函数对result进行处理，让它显示在 输入框中
							console.log('返回了' + JSON.stringify(result))
							var status = result.status;
							if (status == 0) {
								var data = result.data;
								var users = data.users;
								var Cv = data.Cv;
								var experienceList =data.experienceList;
								var educationList = data.educationList;
								var sex = users.sex;
								var married = users.married;
								var age = getage(users.birth);
								if(sex == 1){sex = "男"}else{sex = "女"}
								if(married == 1){married = "已婚"}else{married = "未婚"}
								$('#name_cv').text(users.realName+"的简历");
								$('#realname').text("姓名："+users.realName);
								$('#nature').text("民族："+users.nature);
								$('#sex').text("性别："+sex);
								$('#married').text("是否婚配："+married);
								$('#age').text("年龄："+age);
								$('#city').text("目前居住城市："+users.city);
								$('#phone').text("联系方式："+users.phone);
								$('#email').text("邮箱地址："+users.email);
								var college = "";
								var major = '';
								var start = '';
								var end = '';
								var jobName = "";
								var content = '';
								var estart = '';
								var eend = '';
								for(var i in educationList){
									college = educationList[i].college;
									major = educationList[i].major;
									start = educationList[i].start;
									end = educationList[i].end;
								}
								
								for(var i in experienceList){
									jobName = experienceList[i].jobName;
									content = experienceList[i].content;
									estart = experienceList[i].start;
									eend = experienceList[i].end;
								}
								$('#college').text("所读学校/毕业学校："+college);
								$('#photo').attr("src",users.photo);
								$('#education_time').text(start+" 至 "+end);
								$('#college_name').text("就读于"+college);
								$('#major').text("专业："+major);
								
								$('#work_time').text(estart+" 至 "+eend);
								$('#jobname').text("职位名称："+jobName);
								$('#work_content').text("工作内容："+content);
								if(Cv != null){
									var cv_url = Cv.paths+Cv.fileId
									var cv_name = Cv.fileName
									$('#cv_file').attr("href",cv_url);
									$('#cv_file').attr("title",cv_name);
								}
							} else {
								var msg = result.msg;
								alert(msg);
							}
						},
						error: function(Error) {
							console.log(Error);
						},
						complete: function(xhr, data) {
							console.log("complete");
						}
					});
				}
			
				function getCookie(name) {
					var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
					if (arr = document.cookie.match(reg))
						return unescape(arr[2]);
					else
						return null;
				}
				function getage(birthday){
					// 获得今天的时间
					var date = new Date();
					//alert(birthday);
					var startDate = new Date(birthday);
					var newDate = date.getTime() - startDate.getTime();
					// 向下取整  例如 10岁 20天 会计算成 10岁
					// 如果要向上取整 计算成11岁，把floor替换成 ceil
					var age = Math.ceil(newDate / 1000 / 60 / 60 / 24 /365);
					if (isNaN(age)){
					    age = "";
					}
					return age;
				}
			</script>



		<div id="cboxOverlay" style="display: none;"></div>
		<div id="colorbox" class="" role="dialog" tabindex="-1" style="display: none;">
			<div id="cboxWrapper">
				<div>
					<div id="cboxTopLeft" style="float: left;"></div>
					<div id="cboxTopCenter" style="float: left;"></div>
					<div id="cboxTopRight" style="float: left;"></div>
				</div>
				<div style="clear: left;">
					<div id="cboxMiddleLeft" style="float: left;"></div>
					<div id="cboxContent" style="float: left;">
						<div id="cboxTitle" style="float: left;"></div>
						<div id="cboxCurrent" style="float: left;"></div><button type="button" id="cboxPrevious"></button><button type="button"
						 id="cboxNext"></button><button id="cboxSlideshow"></button>
						<div id="cboxLoadingOverlay" style="float: left;"></div>
						<div id="cboxLoadingGraphic" style="float: left;"></div>
					</div>
					<div id="cboxMiddleRight" style="float: left;"></div>
				</div>
				<div style="clear: left;">
					<div id="cboxBottomLeft" style="float: left;"></div>
					<div id="cboxBottomCenter" style="float: left;"></div>
					<div id="cboxBottomRight" style="float: left;"></div>
				</div>
			</div>
			<div style="position: absolute; width: 9999px; visibility: hidden; display: none;"></div>
		</div>
	</body>
</html>
